package com.example.cognitivesystemserver.service;

import com.example.cognitivesystemserver.mapper.TeacherMapper;
import com.example.cognitivesystemserver.pojo.Teacher;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TeacherServiceImpl implements TeacherService{
    @Autowired
    private TeacherMapper teacherMapper;

    @Override
    public void addTeacher(Teacher teacher) {
        teacherMapper.addTeacher(teacher);
    }

    @Override
    public void deleteTeacher(String id) {
        teacherMapper.deleteTeacher(id);
    }

    @Override
    public void updateTeacher(Teacher teacher) {
        teacherMapper.updateTeacher(teacher);
    }

    @Override
    public Teacher getTeacher(String TeacherId) {
        return  teacherMapper.getTeacher(TeacherId);
    }

    @Override
    public List<Teacher> getAllTeacher() {
        return teacherMapper.getAllTeacher();
    }
}
